<html>
<head><meta charset="utf-8"><title>Chalk panic · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html">Chalk panic</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212350162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212350162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212350162">(Oct 05 2020 at 20:09)</a>:</h4>
<p>I'm seeing panics in chalk due to <code>unimplemeted!()</code> macros being hit. This is causing RA to crash. Is it expected that chalk is publishing with unimplemented calls? I would imagine it should continue rather than completely panic, that <code>unimplemented</code> would be something left in for debugging, but wanted to check here before filing a bug in chalk. Cc <span class="user-mention" data-user-id="133169">@matklad</span> <span class="user-mention" data-user-id="211727">@Jonas Schievink</span></p>



<a name="212350394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212350394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212350394">(Oct 05 2020 at 20:11)</a>:</h4>
<p>Can you post a backtrace?</p>



<a name="212350669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212350669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212350669">(Oct 05 2020 at 20:14)</a>:</h4>
<p>The panic is happening somewhere around here <a href="https://github.com/rust-lang/chalk/blob/8f2805620b6928ad76aab3f11b322ad0771c7cbe/chalk-solve/src/clauses.rs#L80">https://github.com/rust-lang/chalk/blob/8f2805620b6928ad76aab3f11b322ad0771c7cbe/chalk-solve/src/clauses.rs#L80</a> but it's hard to tell exactly because it's inlined inside of <a href="https://github.com/rust-lang/chalk/blob/8f2805620b6928ad76aab3f11b322ad0771c7cbe/chalk-solve/src/clauses.rs#L117">https://github.com/rust-lang/chalk/blob/8f2805620b6928ad76aab3f11b322ad0771c7cbe/chalk-solve/src/clauses.rs#L117</a> in my backtrace</p>



<a name="212351078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212351078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212351078">(Oct 05 2020 at 20:17)</a>:</h4>
<div class="codehilite"><pre><span></span><code>Panic context:

&gt; request: textDocument/hover HoverParams {

text_document_position_params: TextDocumentPositionParams {

text_document: TextDocumentIdentifier {

uri: &quot;&lt;stripped&gt;&quot;,

},

position: Position {

line: 49,

character: 24,

},

},

work_done_progress_params: WorkDoneProgressParams {

work_done_token: None,

},

}


thread &#39;&lt;unnamed&gt;&#39; panicked at &#39;not implemented&#39;, /rustc/04488afe34512aa4c33566eb16d8c912a3ae04f9/src/libstd/macros.rs:13:23

stack backtrace:

0: backtrace::backtrace::libunwind::trace

at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/libunwind.rs:86

1: backtrace::backtrace::trace_unsynchronized

at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.46/src/backtrace/mod.rs:66

2: std::sys_common::backtrace::_print_fmt

at src/libstd/sys_common/backtrace.rs:78

3: &lt;std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display&gt;::fmt

at src/libstd/sys_common/backtrace.rs:59

4: core::fmt::write

at src/libcore/fmt/mod.rs:1076

5: std::io::Write::write_fmt

at src/libstd/io/mod.rs:1537

6: std::sys_common::backtrace::_print

at src/libstd/sys_common/backtrace.rs:62

7: std::sys_common::backtrace::print

at src/libstd/sys_common/backtrace.rs:49

8: std::panicking::default_hook::{{closure}}

at src/libstd/panicking.rs:198

9: std::panicking::default_hook

at src/libstd/panicking.rs:217

10: std::thread::local::LocalKey&lt;T&gt;::with

11: stdx::panic_context::PanicContext::init::{{closure}}

12: std::panicking::rust_panic_with_hook

at src/libstd/panicking.rs:530

13: std::panicking::begin_panic

14: chalk_solve::clauses::push_auto_trait_impls

15: chalk_solve::clauses::builder::ClauseBuilder&lt;I&gt;::push_binders

16: chalk_solve::clauses::program_clauses_that_could_match

17: chalk_solve::clauses::program_clauses_for_goal

18: &lt;chalk_recursive::recursive::Solver&lt;I&gt; as chalk_recursive::solve::SolveDatabase&lt;I&gt;&gt;::solve_goal

19: &lt;chalk_recursive::recursive::RecursiveSolver&lt;I&gt; as chalk_solve::solve::Solver&lt;I&gt;&gt;::solve_limited

20: hir_ty::traits::trait_solve_query

21: salsa::runtime::Runtime::execute_query_implementation

22: salsa::derived::slot::Slot&lt;Q,MP&gt;::read_upgrade

23: salsa::derived::slot::Slot&lt;Q,MP&gt;::read

24: &lt;salsa::derived::DerivedStorage&lt;Q,MP&gt; as salsa::plumbing::QueryStorageOps&lt;Q&gt;&gt;::try_fetch

25: salsa::QueryTable&lt;Q&gt;::get

26: &lt;DB as hir_ty::db::HirDatabase&gt;::trait_solve::__shim

27: &lt;DB as hir_ty::db::HirDatabase&gt;::trait_solve

28: hir_ty::infer::InferenceContext::resolve_ty_as_possible

29: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_coerce

30: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::check_call_arguments

31: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner

32: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr

33: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_method_call

34: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner

35: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr

36: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner

37: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_coerce

38: hir_ty::infer::infer_query

39: salsa::runtime::Runtime::execute_query_implementation

40: salsa::derived::slot::Slot&lt;Q,MP&gt;::read_upgrade

41: salsa::derived::slot::Slot&lt;Q,MP&gt;::read

42: &lt;salsa::derived::DerivedStorage&lt;Q,MP&gt; as salsa::plumbing::QueryStorageOps&lt;Q&gt;&gt;::try_fetch

43: &lt;DB as hir_ty::db::HirDatabase&gt;::infer_query::__shim

44: hir_ty::db::infer_wait

45: hir::source_analyzer::SourceAnalyzer::new_for_body

46: hir::semantics::SemanticsImpl::analyze2

47: hir::semantics::SemanticsImpl::descend_into_macros

48: ide::hover::hover

49: ide::Analysis::hover

50: rust_analyzer::handlers::handle_hover

51: &lt;F as threadpool::FnBox&gt;::call_box

note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
</code></pre></div>



<a name="212351170"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212351170" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212351170">(Oct 05 2020 at 20:18)</a>:</h4>
<p>The stripped url was something I did because I'm not sure if I'm allowed to share work machine paths</p>



<a name="212351653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212351653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> woody77 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212351653">(Oct 05 2020 at 20:22)</a>:</h4>
<p>full backtrace:  </p>
<div class="codehilite"><pre><span></span><code>thread &#39;&lt;unnamed&gt;&#39; panicked at &#39;not implemented&#39;, /Users/aaronwood/.cargo/registry/src/github.com-1ecc6299db9ec823/chalk-solve-0.30.0/src/clauses.rs:60:40
stack backtrace:
   0: std::panicking::begin_panic
   1: chalk_solve::clauses::push_auto_trait_impls
   2: chalk_solve::clauses::builder::ClauseBuilder&lt;I&gt;::push_binders
   3: chalk_solve::clauses::program_clauses_for_goal
   4: chalk_recursive::recursive::Solver&lt;I&gt;::solve_new_subgoal
   5: &lt;chalk_recursive::recursive::Solver&lt;I&gt; as chalk_recursive::solve::SolveDatabase&lt;I&gt;&gt;::solve_goal
   6: chalk_recursive::fulfill::Fulfill&lt;I,Solver,Infer&gt;::prove
   7: chalk_recursive::fulfill::Fulfill&lt;I,Solver,Infer&gt;::solve
   8: chalk_recursive::recursive::Solver&lt;I&gt;::solve_new_subgoal
   9: &lt;chalk_recursive::recursive::Solver&lt;I&gt; as chalk_recursive::solve::SolveDatabase&lt;I&gt;&gt;::solve_goal
  10: chalk_recursive::fulfill::Fulfill&lt;I,Solver,Infer&gt;::prove
  11: chalk_recursive::fulfill::Fulfill&lt;I,Solver,Infer&gt;::solve
  12: chalk_recursive::recursive::Solver&lt;I&gt;::solve_new_subgoal
  13: &lt;chalk_recursive::recursive::Solver&lt;I&gt; as chalk_recursive::solve::SolveDatabase&lt;I&gt;&gt;::solve_goal
  14: &lt;chalk_recursive::recursive::RecursiveSolver&lt;I&gt; as chalk_solve::solve::Solver&lt;I&gt;&gt;::solve_limited
  15: hir_ty::traits::trait_solve_query
  16: salsa::runtime::Runtime::execute_query_implementation
  17: salsa::derived::slot::Slot&lt;Q,MP&gt;::read_upgrade
  18: salsa::derived::slot::Slot&lt;Q,MP&gt;::read
  19: &lt;salsa::derived::DerivedStorage&lt;Q,MP&gt; as salsa::plumbing::QueryStorageOps&lt;Q&gt;&gt;::try_fetch
  20: &lt;DB as hir_ty::db::HirDatabase&gt;::trait_solve::__shim
  21: &lt;DB as hir_ty::db::HirDatabase&gt;::trait_solve
  22: hir_ty::infer::InferenceContext::resolve_ty_as_possible
  23: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_coerce
  24: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::check_call_arguments
  25: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner
  26: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_coerce
  27: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::check_call_arguments
  28: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner
  29: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_coerce
  30: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner
  31: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr
  32: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner
  33: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner
  34: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_coerce
  35: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner
  36: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner
  37: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_coerce
  38: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_inner
  39: hir_ty::infer::expr::&lt;impl hir_ty::infer::InferenceContext&gt;::infer_expr_coerce
  40: hir_ty::infer::infer_query
  41: salsa::runtime::Runtime::execute_query_implementation
  42: salsa::derived::slot::Slot&lt;Q,MP&gt;::read_upgrade
  43: salsa::derived::slot::Slot&lt;Q,MP&gt;::read
  44: &lt;salsa::derived::DerivedStorage&lt;Q,MP&gt; as salsa::plumbing::QueryStorageOps&lt;Q&gt;&gt;::try_fetch
  45: &lt;DB as hir_ty::db::HirDatabase&gt;::infer_query::__shim
  46: hir_ty::db::infer_wait
  47: hir::source_analyzer::SourceAnalyzer::new_for_body
  48: hir::semantics::SemanticsImpl::analyze2
  49: hir::semantics::SemanticsImpl::type_of_pat
  50: ide::inlay_hints::inlay_hints
  51: std::panicking::try
  52: ide::Analysis::inlay_hints
  53: rust_analyzer::handlers::handle_inlay_hints
  54: &lt;F as threadpool::FnBox&gt;::call_box
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Panic context:
&gt; request: rust-analyzer/inlayHints InlayHintsParams {
    text_document: TextDocumentIdentifier {
        uri: &quot;file:///[omitted by aaronwood@]&quot;,
    },
}
</code></pre></div>



<a name="212352366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212352366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212352366">(Oct 05 2020 at 20:28)</a>:</h4>
<p>eek yeah we probably should have not done that</p>



<a name="212352896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212352896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212352896">(Oct 05 2020 at 20:32)</a>:</h4>
<p>Should be a super simple fix</p>



<a name="212361150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212361150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212361150">(Oct 05 2020 at 21:50)</a>:</h4>
<p>Forgot to follow up. I should file a bug against chalk, right?</p>



<a name="212361854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212361854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212361854">(Oct 05 2020 at 21:59)</a>:</h4>
<p>Filed <a href="https://github.com/rust-lang/chalk/issues/621">https://github.com/rust-lang/chalk/issues/621</a></p>



<a name="212363925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Chalk%20panic/near/212363925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Chalk.20panic.html#212363925">(Oct 05 2020 at 22:24)</a>:</h4>
<p><a href="https://github.com/rust-lang-nursery/chalk/issues/622">chalk#622</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>